#ifndef CORE_H
#define CORE_H

#include <QObject>
#include <QMutex>

#include "settingssql.h"
#include "../settings/isettings.h"
#include "pluginsmanager.h"


class Core : public QObject
{
    Q_OBJECT
	Q_DISABLE_COPY(Core)
private:
	Core();
	~Core();

	static Core *m_pInstance;

	//singleton part end

	QMutex m_mutex;

	class CorePrivate;
	CorePrivate *d;

public:
	static Core* instance();
	static void setInstance(Core *singleton);
	static void drop();

	//singleton part end


	void registerSettingPage(ISettings *page);
	bool unregisterSettingPage(ISettings *page);

	const QList<ISettings*>& getSettingsPages() const;

	SettingsSQL* settings();
	PluginsManager* pluginsManager();
	QObject* database( QString fileName = QString() );

signals:

public slots:

};

#endif // CORE_H
